#include "OptionState.h"

#include <iostream>
#include "common_include.h"
using std::cout;


OptionState::OptionState(void) : BaseState()
{
   m_iStateType = STATE_OPTIONS;
   m_bUpdateScreen = true;
   m_ePreviousState = STATE_NOTSET;
}


OptionState::~OptionState(void)
{
}

void OptionState::OnEnter()
{
   // Don't forget to call the base state's function so we get base variables set correctly
   BaseState::OnEnter();

   //m_eCurMenuSelect = OPTION_RETURN;
   m_bUpdateScreen = true;
}

void OptionState::Update(float fTime)
{
   // TODO: add any updates required here
}

void OptionState::Render()
{
   // Don't draw if we don't have to.
   if (!m_bUpdateScreen)
      return;

   system("cls");
   cout << "\n\n\t\t\t This is the Options Page, it needs some work. \n\t\t\tHit Enter to return to the previous page.";

   m_bUpdateScreen = false;
}

void OptionState::GetInput()
{
   if (GetAsyncKeyState(VK_RETURN) & 0x81)
   {
      if (m_ePreviousState != STATE_NOTSET)
      {
         GameManager::GetInstance()->SetGameState(m_ePreviousState);
      }
   }
}
